package com.marry.blog.dao;

import com.marry.blog.entity.Blog;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * Created by ml on 2017-08-01.
 */
public interface BlogDao {

    //分页查询博客
    public List<Blog> listBlog(Map<String,Object> map);

    public Long getTotal(Map<String,Object> map);

    //根据博客类型的id查询该类型下的博客数量
    public Integer getCountBlogByTypeId(Integer typeId);

    public Integer saveBlog(Blog blog);

    public Integer updateBlog(Blog blog);

    public Integer deleteBlog(Integer id);

    public Blog getBlogById(Integer id);



}
